<?php
/**
 * System_Model_ResourceMapper
 *
 * @author mmxie
 * @copyright Copyright (c) 2009 Green Shore (http://www.iwgame.com)
 * @version $Id: ResourceMapper.php 196 2011-03-31 01:49:19Z mmxie $
 */
class System_Model_ResourceMapper extends IG_ModelMapper
{
    public function fetchKey()
    {
        $data = array();
        foreach ($this->fetchAll() as $r) {
            $key = array(
                'module'     => $r->getModule(),
                'controller' => $r->getController(),
                'action'     => $r->getAction(),
            );
            $data[implode(',', $key)] = $r->getResourceId();
        }

        return $data;
    }

}

